--- id: TASK-011 title: Team stat bars in detail view status: "\U0001F3C1 Done" assignee: - '@humdrum-tiv' created_date: '2026-06-16 21:52' updated_date: '2026-06-18 01:17' labels: - feature dependencies: [] priority: medium ordinal: 11000 --- ## Description Golazo-style team statistics in the game detail: possession as a split gradient bar, shots / shots-on-target / corners / fouls as mirrored comparison bars. Data is already available but unused: ESPN soccer summary boxscore.teams[].statistics (possessionPct, totalShots, shotsOnTarget, wonCorners, foulsCommitted, saves, passes). Extend model.GameDetail + espn mapping to capture team-level stats; render bars with block shading (▓▒░). Also applies to MLB/NBA/NHL/NFL team statistics. ## Acceptance Criteria - [x] #1 soccer detail shows possession + shots bars from boxscore.teams stats - [x] #2 bars use block shading and team colors ## Final Summary Added soccer team-stat comparison bars to the game detail view. What: - model.GameDetail gains TeamStats []model.TeamStat (Label/Key/Away/Home). - espn: summary boxscore now decodes the flat team stat list (boxscore.teams[].statistics). mapTeamStats pairs home vs away for a curated, ordered subset (possession, shots, on-target, corners, fouls, saves); returns nil unless both sides present (stick-and-ball sports nest team stats differently and are left to the existing per-player box score). - UI: teamStatsBlock renders each stat as a proportional split bar (away|home) in team colors with block shading (▓ / ░ fallback when 0-0), value on each side, label centered above. Shown above the soccer Key Events timeline. Tests: mapTeamStats (curated/ordered pairing + present-keys-only) and both-sides-required guard; live-smoke verified 6 stats map for a real World Cup game. go vet + go test ./... pass.